﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using vantexe_controller;
using vantexe_model;

namespace vantexe_view
{
    public partial class FindPersonForm : Form
    {
        PersonController pcontr = new PersonController();

        public Person SomePerson { get; set; }

        private void MyInitialize()
        {
            if (SomePerson == null)
            {
                SomePerson = new Person();
            }
        }

        public FindPersonForm()
        {
            InitializeComponent();
            MyInitialize();
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void findPersonButton_Click(object sender, EventArgs e)
        {
            PersonController pcontr = new PersonController();
            SomePerson = pcontr.GetPersonById(2);
            PersonSearchResult res = new PersonSearchResult(SomePerson);
            res.Show();

        }
    }
}
